package com.healthyeating.manage.domain.dto;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
//@JsonIgnoreProperties(ignoreUnknown = true)
public class ChatResponse {
    private String id;
    private String object;
    private Integer created;
    private String model;
    private List<Choice> choices;
    @JSONField(name = "system_fingerprint")
    private String systemFingerprint;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
//    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Choice {
        private int index;
        private Delta delta;
        @JSONField(name = "finish_reason")
        private String finishReason;

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
//        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class Delta {
            private String role;
            private String content;
        }
    }
}
